{% extends "base.html" %}

{% block content %}
<div class="container">
    <h1>电影推荐</h1>
    
    <div class="row">
        {% for movie in recommended_movies %}
        <div class="col-md-4 mb-4">
            <div class="card">
                <div class="card-body">
                    <h5 class="card-title">{{ movie.title }}</h5>
                    <p class="card-text">
                        <strong>类型:</strong> {{ movie.genres }}<br>
                        <strong>平均评分:</strong> {{ movie.avg_rating|floatformat:1 }}/5.0<br>
                        <strong>评分数:</strong> {{ movie.num_ratings }}
                    </p>
                    <a href="#" class="btn btn-primary">查看详情</a>
                </div>
            </div>
        </div>
        {% empty %}
        <div class="col-12">
            <p>暂无推荐电影。</p>
        </div>
        {% endfor %}
    </div>
</div>
{% endblock %} 